package myfuncdemo.xzh.com.activitys;

/**
 * 作者 ： xiezhihui on 2017\10\18 0018.
 * Q Q ： 347649749
 * 作用 ： 所有类的activity（注解，网络请求，图片缓存，版本更新，下载，本地文件的读写操作 ）
 */

import android.app.Activity;
import android.content.Context;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.support.v7.widget.LinearLayoutManager;
import android.support.v7.widget.RecyclerView;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.TextView;

import java.util.ArrayList;
import java.util.List;

import myfuncdemo.xzh.com.R;
import myfuncdemo.xzh.com.adapters.MyAdapter;

public class MainActivity extends Activity {

    private RecyclerView mRecyclerView;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);

        setRecyckerView();
    }

    private void setRecyckerView() {
        mRecyclerView = (RecyclerView) findViewById(R.id.mRecyclerView);
        List<String> list = new ArrayList<>();
        list.add("android");
        LinearLayoutManager manager = new LinearLayoutManager(this);
        mRecyclerView.setLayoutManager(manager);
        mRecyclerView.setAdapter(new MyAdapter(list,this));
    }
}
